package com.smile.frame.api.es.controller;

import com.smile.frame.api.es.document.Order;
import com.smile.frame.api.es.service.IEsOrderService;
import com.smile.frame.common.result.Result;
import com.smile.frame.config.log.systemlog.SystemLog;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;


/**
 * @author LGC
 */
@RestController
@RequestMapping("/api/es/order")
@Api("order")
public class OrderController {

    @Resource
    private IEsOrderService orderService;

    @SystemLog
    @ApiOperation("insertOrder")
    @PostMapping("/insertOrder")
    public Result<Boolean> insertOrder(@RequestBody Order Order) {
        return Result.ok(orderService.insertOrder(Order));
    }

}
